package org.ytor.core.sqlflow.builder.support;

import java.util.HashMap;
import java.util.Map;

/**
 * created by yangtong on 2025/8/7 20:49:29
 * <br/>
 * where子句构造
 */
public class WhereBuilder extends ConditionBuilder {

    public WhereBuilder() {
        super(new HashMap<>());
    }

    public WhereBuilder(Map<Object, String> tableAliases) {
        super(tableAliases);
    }

    @Override
    public String toSql() {
        String inner = super.toSql();
        return inner.isEmpty() ? "" : "\nWHERE\n\t" + inner;
    }

}